#!/bin/bash
# WSL2 基础环境配置脚本
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
VERSION=$(lsb_release -cs)
sudo tee /etc/apt/sources.list <<EOF
deb http://mirrors.aliyun.com/ubuntu/ $VERSION main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ $VERSION main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ $VERSION-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ $VERSION-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ $VERSION-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ $VERSION-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ $VERSION-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ $VERSION-backports main restricted universe multiverse
EOF
sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential curl git